package com.gopay.common.domain.acps;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;

/**
 * 账务核心处理中心 账户信息主表
 * 
 * @AcpsAcctMast.java
 * @author zhanglei
 * @2012-12-28 上午10:31:48 www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "ACPS_ACCT_MAST")
public class AcpsAcctMast extends BaseEntity {
    private static final long serialVersionUID = -7613885507003292453L;
    /** acctId 自增序列1：个人用户以1开头 */
    public static final String SEQUENCE_1 = "ACPS_ACCT_ID_1";
    /** acctId 自增序列2：企业用户以2开头 */
    public static final String SEQUENCE_2 = "ACPS_ACCT_ID_2";
    /** 虚拟卡号长度 **/
    public static final int MAX_ACID_LENGTH = 19;
    /** 虚拟卡密码当日最大错误次数 **/
    public static final int MAX_PAYPWD_DAY_ERR = 3;
    private String acctId;
    private int version;
    private AcctStatus accStatus;
    private Long noOfTrns;
    private DeleteFlag delFlg;
    private String acctName;
    private String schemaCode;
    private String custId;
    private AcctProd prodCode;
    private String prodSubCode;
    private String curType;
    private FrezCode frezCode;
    private String frezReasonCode;
    private Date acctOpnDate;
    private String acctClsFlg;
    private Date acctClsDate;
    private BigDecimal balAmt;
    private BigDecimal avaAmt;
    private BigDecimal frezAmt;
    private long totModTimes;
    private String specialAcctInd;
    private BigDecimal cumDrAmt;
    private BigDecimal cumCrAmt;
    private Date lastTranDate;
    private String intPaidFlg;
    private String lchgUserId;
    private String rcreUserId;
    private String systemOnlyAcctFlg;
    private Date lastFrezDate;
    private Date lastUnfrezDate;
    private Date lastModifiedDate;
    private String interestCode;
    private BigDecimal todayDrawAmt;
    private BigDecimal todayDrawAmtLim;
    private BigDecimal sumDrawAmt;
    private BigDecimal todayTransAmt;
    private BigDecimal todayTransAmtLim;
    private BigDecimal sumTransAmt;
    private BigDecimal totalInvoiceAmt;
    private BigDecimal totalRefundfeeAmt;
    private String vfdStatus;
    private String clrFlag;
    private String clrRul;
    // private String gainsModelId;
    // private int settlementCycle;
    private String payPwd;
    private String payQus;
    private String payQusAnswer;
    private int todayPwdErrNum;
    private int totalPwdErrNum;
    private PayPasswordStatus payPwdStatus;
    private Date createdTs;
    private Date lastUpdTs;
    private String lastUpdTrancode;
    private String remark1;
    private String remark2;
    private String doAcctFlag;

    @Id
    @Column(name = "ACCT_ID", unique = true, nullable = false, length = 19)
    public String getAcctId() {
        return this.acctId;
    }

    public void setAcctId(String acctId) {
        this.acctId = acctId;
    }

    @Version
    @Column(name = "VERSION", nullable = false, precision = 22, scale = 0)
    public int getVersion() {
        return this.version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Column(name = "ACC_STATUS", nullable = false, length = 2)
    @Enumerated(EnumType.STRING)
    public AcctStatus getAccStatus() {
        return this.accStatus;
    }

    public void setAccStatus(AcctStatus accStatus) {
        this.accStatus = accStatus;
    }

    @Column(name = "NO_OF_TRNS", precision = 10, scale = 0)
    public Long getNoOfTrns() {
        return this.noOfTrns;
    }

    public void setNoOfTrns(Long noOfTrns) {
        this.noOfTrns = noOfTrns;
    }

    @Column(name = "DEL_FLG", precision = 1, scale = 0)
    @Enumerated(EnumType.ORDINAL)
    public DeleteFlag getDelFlg() {
        return this.delFlg;
    }

    public void setDelFlg(DeleteFlag delFlg) {
        this.delFlg = delFlg;
    }

    @Column(name = "ACCT_NAME", nullable = false, length = 80)
    public String getAcctName() {
        return this.acctName;
    }

    public void setAcctName(String acctName) {
        this.acctName = acctName;
    }

    @Column(name = "SCHEMA_CODE", nullable = false, length = 5)
    public String getSchemaCode() {
        return this.schemaCode;
    }

    public void setSchemaCode(String schemaCode) {
        this.schemaCode = schemaCode;
    }

    @Column(name = "CUST_ID", nullable = false, length = 10)
    public String getCustId() {
        return this.custId;
    }

    public void setCustId(String custId) {
        this.custId = custId;
    }

    @Column(name = "PROD_CODE", nullable = false, length = 10)
    @Enumerated(EnumType.STRING)
    public AcctProd getProdCode() {
        return this.prodCode;
    }

    public void setProdCode(AcctProd prodCode) {
        this.prodCode = prodCode;
    }

    @Column(name = "PROD_SUB_CODE", length = 4)
    public String getProdSubCode() {
        return this.prodSubCode;
    }

    public void setProdSubCode(String prodSubCode) {
        this.prodSubCode = prodSubCode;
    }

    @Column(name = "CUR_TYPE", nullable = false, length = 3)
    public String getCurType() {
        return this.curType;
    }

    public void setCurType(String curType) {
        this.curType = curType;
    }

    @Column(name = "FREZ_CODE", length = 3)
    @Enumerated(EnumType.STRING)
    public FrezCode getFrezCode() {
        return this.frezCode;
    }

    public void setFrezCode(FrezCode frezCode) {
        this.frezCode = frezCode;
    }

    @Column(name = "FREZ_REASON_CODE", length = 3)
    public String getFrezReasonCode() {
        return this.frezReasonCode;
    }

    public void setFrezReasonCode(String frezReasonCode) {
        this.frezReasonCode = frezReasonCode;
    }

    @Column(name = "ACCT_OPN_DATE", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getAcctOpnDate() {
        return this.acctOpnDate;
    }

    public void setAcctOpnDate(Date acctOpnDate) {
        this.acctOpnDate = acctOpnDate;
    }

    @Column(name = "ACCT_CLS_FLG", length = 1)
    public String getAcctClsFlg() {
        return this.acctClsFlg;
    }

    public void setAcctClsFlg(String acctClsFlg) {
        this.acctClsFlg = acctClsFlg;
    }

    @Column(name = "ACCT_CLS_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getAcctClsDate() {
        return this.acctClsDate;
    }

    public void setAcctClsDate(Date acctClsDate) {
        this.acctClsDate = acctClsDate;
    }

    @Column(name = "BAL_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getBalAmt() {
        return this.balAmt;
    }

    public void setBalAmt(BigDecimal balAmt) {
        this.balAmt = balAmt;
    }

    @Column(name = "AVA_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getAvaAmt() {
        return this.avaAmt;
    }

    public void setAvaAmt(BigDecimal avaAmt) {
        this.avaAmt = avaAmt;
    }

    @Column(name = "FREZ_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getFrezAmt() {
        return this.frezAmt;
    }

    public void setFrezAmt(BigDecimal frezAmt) {
        this.frezAmt = frezAmt;
    }

    @Column(name = "TOT_MOD_TIMES", nullable = false, precision = 10, scale = 0)
    public long getTotModTimes() {
        return this.totModTimes;
    }

    public void setTotModTimes(long totModTimes) {
        this.totModTimes = totModTimes;
    }

    @Column(name = "SPECIAL_ACCT_IND", length = 3)
    public String getSpecialAcctInd() {
        return this.specialAcctInd;
    }

    public void setSpecialAcctInd(String specialAcctInd) {
        this.specialAcctInd = specialAcctInd;
    }

    @Column(name = "CUM_DR_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getCumDrAmt() {
        return this.cumDrAmt;
    }

    public void setCumDrAmt(BigDecimal cumDrAmt) {
        this.cumDrAmt = cumDrAmt;
    }

    @Column(name = "CUM_CR_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getCumCrAmt() {
        return this.cumCrAmt;
    }

    public void setCumCrAmt(BigDecimal cumCrAmt) {
        this.cumCrAmt = cumCrAmt;
    }

    @Column(name = "LAST_TRAN_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastTranDate() {
        return this.lastTranDate;
    }

    public void setLastTranDate(Date lastTranDate) {
        this.lastTranDate = lastTranDate;
    }

    @Column(name = "INT_PAID_FLG", length = 1)
    public String getIntPaidFlg() {
        return this.intPaidFlg;
    }

    public void setIntPaidFlg(String intPaidFlg) {
        this.intPaidFlg = intPaidFlg;
    }

    @Column(name = "LCHG_USER_ID", nullable = false, length = 10)
    public String getLchgUserId() {
        return this.lchgUserId;
    }

    public void setLchgUserId(String lchgUserId) {
        this.lchgUserId = lchgUserId;
    }

    @Column(name = "RCRE_USER_ID", nullable = false, length = 10)
    public String getRcreUserId() {
        return this.rcreUserId;
    }

    public void setRcreUserId(String rcreUserId) {
        this.rcreUserId = rcreUserId;
    }

    @Column(name = "SYSTEM_ONLY_ACCT_FLG", length = 1)
    public String getSystemOnlyAcctFlg() {
        return this.systemOnlyAcctFlg;
    }

    public void setSystemOnlyAcctFlg(String systemOnlyAcctFlg) {
        this.systemOnlyAcctFlg = systemOnlyAcctFlg;
    }

    @Column(name = "LAST_FREZ_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastFrezDate() {
        return this.lastFrezDate;
    }

    public void setLastFrezDate(Date lastFrezDate) {
        this.lastFrezDate = lastFrezDate;
    }

    @Column(name = "LAST_UNFREZ_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUnfrezDate() {
        return this.lastUnfrezDate;
    }

    public void setLastUnfrezDate(Date lastUnfrezDate) {
        this.lastUnfrezDate = lastUnfrezDate;
    }

    @Column(name = "LAST_MODIFIED_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastModifiedDate() {
        return this.lastModifiedDate;
    }

    public void setLastModifiedDate(Date lastModifiedDate) {
        this.lastModifiedDate = lastModifiedDate;
    }

    @Column(name = "INTEREST_CODE", length = 6)
    public String getInterestCode() {
        return this.interestCode;
    }

    public void setInterestCode(String interestCode) {
        this.interestCode = interestCode;
    }

    @Column(name = "TODAY_DRAW_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getTodayDrawAmt() {
        return this.todayDrawAmt;
    }

    public void setTodayDrawAmt(BigDecimal todayDrawAmt) {
        this.todayDrawAmt = todayDrawAmt;
    }

    @Column(name = "TODAY_DRAW_AMT_LIM", nullable = false, precision = 25, scale = 4)
    public BigDecimal getTodayDrawAmtLim() {
        return this.todayDrawAmtLim;
    }

    public void setTodayDrawAmtLim(BigDecimal todayDrawAmtLim) {
        this.todayDrawAmtLim = todayDrawAmtLim;
    }

    @Column(name = "SUM_DRAW_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getSumDrawAmt() {
        return this.sumDrawAmt;
    }

    public void setSumDrawAmt(BigDecimal sumDrawAmt) {
        this.sumDrawAmt = sumDrawAmt;
    }

    @Column(name = "TODAY_TRANS_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getTodayTransAmt() {
        return this.todayTransAmt;
    }

    public void setTodayTransAmt(BigDecimal todayTransAmt) {
        this.todayTransAmt = todayTransAmt;
    }

    @Column(name = "TODAY_TRANS_AMT_LIM", nullable = false, precision = 25, scale = 4)
    public BigDecimal getTodayTransAmtLim() {
        return this.todayTransAmtLim;
    }

    public void setTodayTransAmtLim(BigDecimal todayTransAmtLim) {
        this.todayTransAmtLim = todayTransAmtLim;
    }

    @Column(name = "SUM_TRANS_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getSumTransAmt() {
        return this.sumTransAmt;
    }

    public void setSumTransAmt(BigDecimal sumTransAmt) {
        this.sumTransAmt = sumTransAmt;
    }

    @Column(name = "TOTAL_INVOICE_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getTotalInvoiceAmt() {
        return this.totalInvoiceAmt;
    }

    public void setTotalInvoiceAmt(BigDecimal totalInvoiceAmt) {
        this.totalInvoiceAmt = totalInvoiceAmt;
    }

    @Column(name = "TOTAL_REFUNDFEE_AMT", nullable = false, precision = 25, scale = 4)
    public BigDecimal getTotalRefundfeeAmt() {
        return this.totalRefundfeeAmt;
    }

    public void setTotalRefundfeeAmt(BigDecimal totalRefundfeeAmt) {
        this.totalRefundfeeAmt = totalRefundfeeAmt;
    }

    @Column(name = "VFD_STATUS", nullable = false, length = 1)
    public String getVfdStatus() {
        return this.vfdStatus;
    }

    public void setVfdStatus(String vfdStatus) {
        this.vfdStatus = vfdStatus;
    }

    @Column(name = "CLR_FLAG", nullable = false, length = 1)
    public String getClrFlag() {
        return this.clrFlag;
    }

    public void setClrFlag(String clrFlag) {
        this.clrFlag = clrFlag;
    }

    @Column(name = "CLR_RUL", nullable = false, length = 20)
    public String getClrRul() {
        return this.clrRul;
    }

    public void setClrRul(String clrRul) {
        this.clrRul = clrRul;
    }

    /*
     * @Column(name = "GAINS_MODEL_ID", length = 10) public String
     * getGainsModelId() { return this.gainsModelId; }
     * 
     * public void setGainsModelId(String gainsModelId) { this.gainsModelId =
     * gainsModelId; }
     * 
     * @Column(name = "SETTLEMENT_CYCLE", nullable = false, precision = 1, scale
     * = 0) public int isSettlementCycle() { return this.settlementCycle; }
     * 
     * public void setSettlementCycle(int settlementCycle) {
     * this.settlementCycle = settlementCycle; }
     */

    @Column(name = "PAY_PWD", nullable = false, length = 50)
    public String getPayPwd() {
        return this.payPwd;
    }

    public void setPayPwd(String payPwd) {
        this.payPwd = payPwd;
    }

    @Column(name = "PAY_QUS", length = 50)
    public String getPayQus() {
        return this.payQus;
    }

    public void setPayQus(String payQus) {
        this.payQus = payQus;
    }

    @Column(name = "PAY_QUS_ANSWER", length = 50)
    public String getPayQusAnswer() {
        return this.payQusAnswer;
    }

    public void setPayQusAnswer(String payQusAnswer) {
        this.payQusAnswer = payQusAnswer;
    }

    @Column(name = "TODAY_PWD_ERR_NUM", nullable = false, precision = 22, scale = 0)
    public int getTodayPwdErrNum() {
        return this.todayPwdErrNum;
    }

    public void setTodayPwdErrNum(int todayPwdErrNum) {
        this.todayPwdErrNum = todayPwdErrNum;
    }

    @Column(name = "TOTAL_PWD_ERR_NUM", nullable = false, precision = 22, scale = 0)
    public int getTotalPwdErrNum() {
        return this.totalPwdErrNum;
    }

    public void setTotalPwdErrNum(int totalPwdErrNum) {
        this.totalPwdErrNum = totalPwdErrNum;
    }

    @Column(name = "PAY_PWD_STATUS", nullable = true, precision = 22, scale = 0)
    @Enumerated(EnumType.ORDINAL)
    public PayPasswordStatus getPayPwdStatus() {
        return this.payPwdStatus;
    }

    public void setPayPwdStatus(PayPasswordStatus payPwdStatus) {
        this.payPwdStatus = payPwdStatus;
    }

    @Column(name = "CREATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return this.createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return this.lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Column(name = "LAST_UPD_TRANCODE", length = 6)
    public String getLastUpdTrancode() {
        return this.lastUpdTrancode;
    }

    public void setLastUpdTrancode(String lastUpdTrancode) {
        this.lastUpdTrancode = lastUpdTrancode;
    }

    @Column(name = "REMARK1", length = 200)
    public String getRemark1() {
        return remark1;
    }

    public void setRemark1(String remark1) {
        this.remark1 = remark1;
    }

    @Column(name = "REMARK2", length = 200)
    public String getRemark2() {
        return remark2;
    }

    public void setRemark2(String remark2) {
        this.remark2 = remark2;
    }

    @Column(name = "DO_ACCT_FLAG", length = 10)
    public String getDoAcctFlag() {
        return doAcctFlag;
    }

    public void setDoAcctFlag(String doAcctFlag) {
        this.doAcctFlag = doAcctFlag;
    }
}
